add session, update login handler