authentication bug fixes