Added option for maximum session lifetime

A user session can now be limited to either a certain user setting or a
general maxi session lifetime defined in config.php
Merge branch 'limit-session-time'