login, logout fixed