Added events to check if user already exists - needs updating