how do i write a code for login a user in a site and if the user is not a member how do a create a reistration for the user