user authentication working with error messages