rebased from master and fixed status and login commands