user authentication and conditional login header