Fixed initial authentication bug