Login logout fix