register and login function have be done