Fixed a bug related to login and main templates user management