Fixed bug in user registration if already signed in at the time