Changed login to accept code only