store login state to session
store login state to session