Login and Register script validation