display proper error messages on registration and login form