Added comments.
Modified login command and minor fixes.