Ensure that login_required checks that the user isn't nil.

A user deleted from a database will otherwise pass the login_required check, as it's "nil" and not "GuestUser".
Merge pull request #54 from jesper/master

Stricter check with login_required.