ClientAgent: Splits up the monolithic handle_authenticated function