fixing cookie/session-related issue, revising code annotations

fixing issue on setting up cookie used for encryptedly storing a user's
credentials on server failing due to using wrong cookie pathname on entering
application with deep-link's URL