Minor changes to isLoginValid/isLoginUsed