fixed authentication bug