added status codes to log in