Refactor moving authy components into auth.js. Also only allow logout when logged in, and login when logged out