Redirect to login page if the user is not logged in.
Fixes #177
Fix specs.