Reworking login module to support optional storage and retrieval of
refresh tokens