Added login authentication and redirect