Fixed an issue with server side login

The new code added to simiplify the login and registration calls was not
properly getting the username and email from its parameters.