Updated checkPassword to help with testing