If no user is signed in, it should be 401 and not 403 the status code
Remove unnecessary try/except and move app assignment to right place