use login submodule
simplify login and cookie with login module