Better error and success handling for registration page