Added hooks to init session process.
Revert comment from file header.
Merge pull request #310 from czolnowski/login-flow

New hooks fixes #5331