Login and Register serverside validation