Added checkpassword and login