updated to add functionality for login and logout page with session cookies