Fixes

User can be seen without logout
some bugs solved
change code to elements so files are shorter