Modified login functions to return session vars