fixed a bug thats causing the autologin to fail