added checkusername and checkpassword