dutta2004,
It is highly doubtful that your hosting company will give you access to the SQL u/p or give your login authority to read webmail clients, just for security reasons alone.
For you to share a login, you would need to implement all login procedures that squirrelmail does, weather they use sessions, cookies, or whatever.
You would also have to gain access to their user database, I would contact your hosting company to see what information they can provide you, although, I doubt it will be much.
You will be unable to restrict access to a directory "by a page", you can restrict access with .htaccess if your service provider allows and parses these.
If you are attempting to restrict content, I would recommend a login/password system.
If you wish to restrict files only, this can be done, if this is the case I can post you some code that will help.