working on user authentication and redirecting