Adding logout function. Fixing userLogin relationship.