Redirect from pages#main to account#login if not authenticated.