fix login/logout fuctions ;)