Better user authentication handling.