fixed autologin after registration