fix issue saving user credentials to session