Fix session withcredentials

refactor json view template to event controller attachment
user module complete