before_request not working