fixed the autologin part