'user needs to be logged in for that' error handling on API