Added pin and login functionality