Fix the order of the before_request functions
Local authentication needs to call _check_session_cookie before the
request is ran but that call requires a session to connect to the
database with and that is done in set_request so instead of ensuring
_check_session_cookie is always run first, make it be after set_request.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>