code refactor to login page, added logged in html pages, created session for logged in user