Error handling for log in and sign up pages