fixed logged in bug