public async Task<TokenModel> Register(RegisterViewModel registerViewModel) {
			if (registerViewModel.Email == null || registerViewModel.Password == null) {
				throw new Exception("Register model is invalid");
			}
			ApplicationUser user = await CreateUser(registerViewModel);
			return GetToken(user);
		}
		private async Task<ApplicationUser> CreateUser(RegisterViewModel registerViewModel) {
			ApplicationUser user = new ApplicationUser { UserName = registerViewModel.Email, Email = registerViewModel.Email };
			IdentityResult result = await applicationUserManager.CreateAsync(user, registerViewModel.Password);
			if (!result.Succeeded) {
				throw new Exception("Creating new user failed");
			}

			return user;
		}