Fix bug causing unauthenticated users to crash app when they visited auth-required places.

Problem was that I wasn't using Flask-login's is_authenticated() function.