fix missing stream
fix broken login fun -issue#4