fixing register autologin