Handlers for setting a session and requiring login