Finish auth logic.