staged error handling on register and login page