Added getRegisterFlows and registerWithUser:andPassword.
The same code is shared for login and register requests.