Fixed autologin related bug (refs #31)