Fixed bug that prevented authentication/registration to work correctly.