TryGhost/Ghost — pull request #2388 by manuelmitasch (2014-03-12 00:36:02+00:00)
Title: Ember.js: User fixtures + injection + login

* Adding **user fixtures** for sign-in

* Adds an initializer for the **current logged in user**.
The created singleton object is injected into all controllers + routes.
It can be used inside routes + controllers with this.get('user').
For simple development the object is instanciated with a userFixture.
Once a proper login and api mock is in place, the fixture needs to be removed.

* Added **route 'login'** on url 'sign-in'
* Added authenticated route with an error hook that redirects to the login route, if status 401 is returned from REST API.
* All "secure" routes now extend from authenticated route
* Add /ghost/ember to noAuthNeeded routes in middleware