Wrap the http handlers for auth to reduce duplicate code