changed login method over to ajax to do password validation