Completed changes as requested during code reviews. Specifically, I have ensured that all tabs are now spaces, I have added curly brackets everywhere they can be, and made sure that 401 errors are thrown when user tries to get profile with an invalid session. I have cleaned up code in general to be more legible.
changed method name to "Fails" to be more consistent with what the code is returning.