added before request to check for login