added logged_in checkes to admin functions