Fixed a bug in cat and login.
completed more