fixing issue with autologin