Store in the permalink only modified element

Applied on layertree layer and group, needed to make the private group
visible after a login.
Merge pull request #861 from camptocamp/login-theme

Store in the permalink only modified element