fixing user authentication