move code from a model to a service
use for-comprehension to retrieve login info from db
use cache for logged users
use cache for logged users