removed print statements from authenticate function