Orders controller and logout functionality