Improved Login/Register error handling.