add rest bug and login bug