Added login and logoff fro

still some bug to test