login

finish login module.  and some of logout module