Fixed issues with authentication spec