Updates to pincode login

Pincode login was not working at all before this commit