Implement sign in
Add withCode method to api.Error