Clean code, handle ajax requests, handle register-login view and check if passwords match