php object orientated login form/registration form with server-side validation