Callback function for autologin added
Fix form detection and login page closing