fix(auth): fix checking current user failing

This is really hard to replicate, so its a blind patch, hopefully this code fixes the problem. It should now check if the user is defined before calling it, and if its not, it just takes the user to the login page.