moving authentication hash class to a gem