fix bug with session on login.