Added flags for login and authentication errors