fixing some error messages int he login function