implemented user registartion and authentication