Improve .register function

Allow the register function to add a username and password to an already
existing user. This is useful if used in combination with other strategies
like oauth.
Merge commit '7fb5b57c01fc7c51b7ce62511e92435ff4777835'
Reformat tests