fixed bug that caused user to be registered twice