Log-out bug fixing