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: 
  -include("em_records.hrl").
  
  %% API
  -export([start_link/0]).
  
  -export([
    get/0
  ]).
  
  
  %% gen_server callbacks
  -export([init/1,
    handle_call/3,
    handle_cast/2,
    handle_info/2,
    terminate/2,
    code_change/3]).
  
  -define(SERVER, ?MODULE).
  
  
negative.code: %% @end
  %%--------------------------------------------------------------------
  -spec(start_link() ->
               {ok, Pid :: pid()} | ignore | {error, Reason :: term()}).
  start_link() ->
      gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
  
  %%%===================================================================
  %%% gen_server callbacks
  