Fixed bug with authentication type