Fix basic auth, error status codes