Bug fix

Redirects to login page if not logged in