moved login related code back to app.js after it is no longer has to do with top-bar.