Testinfra

- fixed authentication state and behavior between app/ and neurod/
- that led to fixing code that was copied between the apps, so this was factored out to a shared AngularJS module