Added comments, fixed login case
code refactor

re-ordered some things. fixed download station