added AMD wrapper and logout button

pass in logout button to bind to click. Calls $onTimeout.