Fix automatic login