Put session changes inside before_request hook