adds log in and log out for sessions