anchor.diff:  %% @end
   %%--------------------------------------------------------------------
   -spec(code_change(OldVsn :: term() | {down, term()}, State :: #state{},
  -    Extra :: term()) ->
  -  {ok, NewState :: #state{}} | {error, Reason :: term()}).
  +                  Extra :: term()) ->
  +             {ok, NewState :: #state{}} | {error, Reason :: term()}).
   code_change(_OldVsn, State, _Extra) ->
  -  {ok, State}.
  +    {ok, State}.
   
   %%%===================================================================
   %%% Internal functions
   %%%===================================================================
   
   do_get_users(State = #state{cache = Cache}) ->
  -  {reply, ets:tab2list(Cache), State}.+    {reply, ets:tab2list(Cache), State}.
  +
  +%% em_manager_users:check(<<"demo">>, <<"demo">>).
  +do_check_user(State = #state{cache = Cache}, Email, Password) ->
  +    CheckPass = fun(CurrPassword, User = #user{hashPassword = HashPassword}) ->
  +                        case CurrPassword =:= HashPassword of
  +                            true -> {ok, User};
  +                            false -> {error, <<"Access is denied">>}
  +                        end
  +                end,
  +    Match = ets:fun2ms(fun(User = #user{email = SearchEmail}) when SearchEmail =:= Email -> User end),
  +    case ets:select(Cache, Match) of
  +        [] ->
  +            {reply, {error, <<"Access is denied">>}, State};
  +        [Item|_] ->
  +            {reply, CheckPass(em_password:hash(Password), Item), State}
  +    end.
positive.code: %% @end
  %%--------------------------------------------------------------------
  -spec(terminate(Reason :: (normal | shutdown | {shutdown, term()} | term()),
      State :: #state{}) -> term()).
  terminate(_Reason, #state{cache = Cache}) ->
    ets:delete(Cache),
    ok.
  
  %%--------------------------------------------------------------------
  %% @private
  
negative.code: %% @end
  %%--------------------------------------------------------------------
  -spec(handle_info(Info :: timeout() | term(), State :: #state{}) ->
               {noreply, NewState :: #state{}} |
               {noreply, NewState :: #state{}, timeout() | hibernate} |
               {stop, Reason :: term(), NewState :: #state{}}).
  handle_info(_Info, State) ->
      {noreply, State}.
  
  %%--------------------------------------------------------------------
  %% @private
  