Tweak syntax in spec.
Move login into a service object.