Fixed tickets #408, #409
 * For ticket #408: the current user sessions are now closed if the user account has been locked
 * For ticket #409: the downgrading of privilige was not considered. This is now the case