login almost done, should correct return data type from stream to text