Core pr 3 (merge with Artesis)

This is a merge with Artesis, but a lot of the code have been rewritten after the merge to update coding style and better match the architecture.

* Removed persistent log in (stored user data in drupal DB).
* Added session to handle user data.
* Added full integration with profile2.
* Change the log in flow to support sessions and profile2.
* Fixed access issues with profile2 (only show own profile).
* Added configurable pin code length.
* Added configurable session timeout.