implemented session and login handler for access protected data