fixing error messages for registration and login