 
 	return result
 
+
+
+##############################################
+############ SERVER SIDE METHODS #############
+##############################################
+
 if Meteor.isServer
 	Accounts.livetoken = {
 		auth: "EMAIL-ONLY"


		userDoc.emails = [{address: options.email.toLowerCase(), verified: false}]
		
		# Check if this phone is already existing somewhere

		# Insert user in standard Accounts object
		userId = Accounts.insertUserDoc options, userDoc
		
		Meteor.users.update userId, { $set: {email: options.email.toLowerCase(), phone: options.phone services: userDoc.services, emails: userDoc.emails, try: 0} }

		return userId



			if auth.name is 'ident'
				if Session.get 'livetoken.emailToken'
					auth.name = 'email'
				else if Session.get 'livetoken.phoneToken'
					auth.name = 'phone'
				else
					throw new Meteor.Error 'empty-authentication', 'Your authentication type is not set.'
				options[auth.name] = options.ident
			
			ident = Session.get "livetoken.#{auth.name}Token"
			creds[ident] = { type: auth.name, token: options[auth.name] }
			if auth.name is 'email'
				user.email = ident
		
		if Object.keys(creds).length > 0
			credentials = [creds]
