Fix error handling in registration/login views