Actually return proper error codes for login.