Return error codes for bad auth attempts and display errors on client.