adds some of the working logic for sessions/login/logout