login and fix bug