I solved my problem, and it could definitely help others too.
The problem was with cookies since my folder structure, since it was like this :
- mysite.com
- mysite.com/mypage.php
- mysite/wordpress/
the cookies were only valid for wordpress folder, and it's subdirectories.
In order to activate the cookies outside wordpress, I installed the root Cookie plugin, and everything works fine now.
P.S.
Do NOT change the configuration of root Cookie. Just leave the Domain Name setting as empty.