Made some updated the module, pushed logic to auth module.